# coding=utf-8

'''
@author: guichaochao

@desc: 测试套件运行主入口

'''

# import knowbox1.public.reportInfo
# import knowbox1.public.creatSuite
# import knowbox1.public.sendReport

from public import reportInfo
from public import creatSuite
from public import sendReport
from public import logger

import sys
reload(sys)
sys.setdefaultencoding('utf-8')

def runCase():
    report_path, testReport, runner = reportInfo.report_info()
    allTestCase = creatSuite.createSuite()
    runner.run(allTestCase)
    testReport.close()  # 关闭生成的报告
    try:
       sendReport.send_report(report_path)  # 发送报告
    finally:
         pass


if __name__ == '__main__':
    runCase()
